package com.mjl.shops.fragment;

import android.view.View;

import com.jaeger.library.StatusBarUtil;
import com.mjl.shops.R;
import com.mjl.shops.activity.AccountLoginActivity;
import com.mjl.shops.activity.CompanyPayActivity;
import com.mjl.shops.activity.ConvertActivity;
import com.mjl.shops.activity.GiftCardActivity;
import com.mjl.shops.activity.MineAddressActivity;
import com.mjl.shops.activity.MineCollectionActivity;
import com.mjl.shops.activity.MineFootActivity;
import com.mjl.shops.activity.OrderStateActivity;
import com.mjl.shops.activity.SetingActivity;
import com.mjl.shops.base.BaseFragment;
import com.mjl.shops.view.CircleImageView;
import com.mjl.shops.view.IconTextView;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class MineFragment extends BaseFragment {

    @BindView(R.id.head_circle)
    CircleImageView head;

    @BindView(R.id.icon_set)
    IconTextView icon_set;

    @Override
    protected View initView() {
        StatusBarUtil.setTranslucentForImageView(getActivity(), 10, null);
        StatusBarUtil.setDarkMode(getActivity());
        View mView = View.inflate(getActivity(), R.layout.fragment_mine_layout, null);
        ButterKnife.bind(this, mView);
        return mView;
    }

    @Override
    protected void setData(View view) {

    }

    @Override
    protected void initData() {

    }

    @OnClick({R.id.head_circle, R.id.company_pay_ll, R.id.gift_card_ll, R.id.convert_center_ll,
            R.id.mine_address_rl,R.id.mine_collection_rl,R.id.mine_foot_rl,R.id.icon_set,
            R.id.look_more_order_tv,R.id.order_fk_ll,R.id.order_fh_ll,R.id.order_sh_ll,
            R.id.order_af_ll})
    public void OnClick(View view) {
        switch (view.getId()) {
            case R.id.head_circle:
                //进入登录界面
                AccountLoginActivity.StartIntent(getActivity());
                break;
            case R.id.company_pay_ll:
                CompanyPayActivity.StartIntent(getActivity());
                break;
            case R.id.gift_card_ll:
                GiftCardActivity.StartIntent(getActivity());
                break;
            case R.id.convert_center_ll:
                ConvertActivity.StartIntent(getActivity());
                break;
            case R.id.mine_address_rl:
                MineAddressActivity.StartIntent(getActivity());
                break;
            case R.id.icon_set:
                SetingActivity.StartIntent(getActivity());
                break;
            case R.id.mine_collection_rl:
                MineCollectionActivity.StartIntent(getActivity());
                break;
            case R.id.mine_foot_rl:
                MineFootActivity.StartIntent(getActivity());
                break;
            case R.id.look_more_order_tv:
                OrderStateActivity.StartIntent(getActivity(),0);
                break;
            case R.id.order_fk_ll:
                OrderStateActivity.StartIntent(getActivity(),1);
                break;
            case R.id.order_fh_ll:
                OrderStateActivity.StartIntent(getActivity(),2);
                break;
            case R.id.order_sh_ll:
                OrderStateActivity.StartIntent(getActivity(),3);
                break;
            case R.id.order_af_ll:
                OrderStateActivity.StartIntent(getActivity(),4);
                break;
            default:
                break;
        }
    }


}
